<cfset lastcount = cookie.current_step>
<cfset nextcount = cookie.current_step + 1>
<cfset lastcount = "#lastcount#_">
<cfset nextcount = "#nextcount#_">

<cfset sourceImage = ImageRead('#request.basepath#images/temp/#cookie.imagefile#')>
<cfinvoke component="cfcs.common.cfimageeffects" method="init" returnvariable="effects">
<cfset sepiaimage = effects.sepiaTone(sourceImage)>

<cfset oldimage = '#request.basepath#images/temp/#cookie.imagefile#'>
<cfset newimage = "#request.basepath#images/temp/#replace(cookie.imagefile, lastcount, nextcount)#">

<cfcookie name = "imagefile" value="#replace(cookie.imagefile, lastcount, nextcount)#">

<cfset nextstep = cookie.current_step + 1>
<cfcookie name = "current_step" value="#nextstep#">

<cfset ImageWrite(sepiaImage, '#newimage#')>

<cfinclude template = "../frm/edit.cfm">